/*
 * @Description: 创建移交归档单弹窗
 * @Author: Rfan
 * @Date: 2022-05-12 16:06:57
 * @LastEditTime: 2022-05-18 13:38:50
 */

import { useEffect } from 'react';
import { Button, Form, Input, Modal, Select } from 'antd';
import type { FC } from 'react';
import { ICommonDialog } from '@/interfaces/global';

interface TransferFormProps extends ICommonDialog {}

const TransferForm: FC<TransferFormProps> = (props) => {
  console.log('UploadFloder', props.visible);
  const { visible, onClose } = props;

  useEffect(() => {
    if (visible) {
    }
  }, [visible]);

  /**
   * @description: 关闭弹窗
   */
  const onCancel = () => {
    onClose();
  };

  return (
    <Modal
      title="创建移交申请单"
      visible={visible}
      width={600}
      maskClosable={false}
      destroyOnClose
      onCancel={onCancel}
      footer={[
        <Button key="close" onClick={onCancel}>
          取消
        </Button>,
        // <Button key="createAdd" type="primary">创建并添加档案</Button>,
        <Button key="create" type="primary">
          创建
        </Button>
      ]}
    >
      <Form labelCol={{ span: 5 }} wrapperCol={{ span: 16 }}>
        <Form.Item label="标题" rules={[{ required: true }]}>
          <Input />
        </Form.Item>
        <Form.Item label="档案类型" rules={[{ required: true }]}>
          <Select placeholder="请选择档案类型"></Select>
        </Form.Item>
        <Form.Item label="接收方" rules={[{ required: true }]}>
          <Select placeholder="请选择部门"></Select>
        </Form.Item>
        <Form.Item label="移交说明">
          <Input.TextArea />
        </Form.Item>
      </Form>
    </Modal>
  );
};

export default TransferForm;
